7.2 Plotting Simple Functions

Real functions with one real parameter can be plotted by simply adding them to the plotter. Suitable equations and formulae are promoted to function and lambda definitions when plotted. The formula x^2 is promoted to λ(x)→x^2 and the equation x^2=f(x) is promoted to f(x)→x^2.

A function's domain is represented on the horizontal axis of the plot and the value of the function at each horizontal point is represented on the vertical axis. This generalizes the normal idea of the x and y axes to parameter and function axes. As a result, it is possible to plot two functions like sin w and y^2 on the same plot display. sin w is promoted to λ(w)→sin w but plotted like λ(x)→sin x. Similarly y^2 is promoted to λ(y)→y^2 but plotted like f(x)→x^2. Since the two lambda expressions have different signatures, plotting both of these formulae produces a display like the one in Figure 7.1. The important thing to remember is that the name of the independent variable does not associate it with a particular axis but rather with the horizontal axis.

Figure 7.1 Plot with two formulae